package com.xiongwei.manageback.mapper;

import com.xiongwei.manageback.domain.SysUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.map.repository.config.EnableMapRepositories;

import java.util.List;

/**
* @author a
* @description 针对表【sys_user】的数据库操作Mapper
* @createDate 2023-10-27 17:08:49
* @Entity com.xiongwei.manageback.domain.SysUser
*/
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {
    /**
     * 根据用户名查询数据库
     */
    SysUser getByUsername(String username);

    /**
     * 根据当前登录用户id获取其权限集合
     * @param loginId
     * @return
     */
    List<String> getPermissions(Object loginId);

    /**
     * 根据当前登录用户id获取其角色集合
     * @param loginId
     * @return
     */
    List<String> getRoles(Object loginId);
}




